import request from '@/utils/request'
//获取关于我们
export function getWebSystemAbout(id) {
  return request({
    url: `/siteInfo/getSiteInfo?id=${id}`,
    method: 'get'
  })
}
//保存关于我们
export function webSystemAboutSave(data) {
  return request({
    url: '/siteInfo/save',
    method: 'post',
    data
  })
}

//获取供应商设置的信息--多个
export function getSystemSupplierInfo() {
  return request({
    url: `/sysSet/find`,
    method: 'post'
  })
}
//保存供应商设置信息--可以保存多个key
export function systemSupplierInfoSave(data) {
  return request({
    url: '/sysSet/save',
    method: 'post',
    data
  })
}

//获取供应商自定义信息---单个
export function getWebSupplierInfo(key) {
  return request({
    url: `/sysSet/getByKey?key=${key}`,
    method: 'get'
  })
}

export function getDetailByKey(key) {
  return request({
    url: `/sysSet/getDetailByKey?key=${key}`,
    method: "get"
  });
}



//新闻
export function getNewsList(data) {
  return request({
    url: `/admin/dataNews/list`,
    method: 'post',
    data
  })
}
export function newsSave(data) {
  return request({
    url: `/admin/dataNews/save`,
    method: 'post',
    data
  })
}
export function newsDelBatch(data) {
  return request({
    url: `/admin/dataNews/delBatch`,
    method: 'post',
    data
  })
}
export function newsDel(id) {
  return request({
    url: `/admin/dataNews/del/${id}`,
    method: 'get'
  })
}
export function newsDisable(id) {
  return request({
    url: `/admin/dataNews/disable/${id}`,
    method: 'get'
  })
}
export function newsEnable(id) {
  return request({
    url: `/admin/dataNews/enable/${id}`,
    method: 'get'
  })
}
